Skip to content

Add penguin_qmp_emit_event, the outbound QMP hook penguin's qmp plugi… - #4

Open
lacraig2 wants to merge 1 commit into
mainfrom
workspace/qmp-event-port
Open

lacraig2 wants to merge 1 commit into
mainfrom
workspace/qmp-event-port

Conversation

@lacraig2

Copy link
Copy Markdown
Contributor

…n uses

Port rehosting/qemu 862d4fb74f (#22), which penguin main now depends on: plugins.qmp.emit_event() pushes an unsolicited QMP event of any name to every connected monitor, the counterpart to the QMP command callback. Without it, penguin cannot move from the fork to this repo without losing that API.

Following the repo's split, only the edit to an upstream file is a patch:

  • 0013 adds monitor/penguin-event.c to the qmp source set;
  • src/monitor/penguin-event.c is the emitter, vendored;
  • src/include/system/penguin.h declares it and src/scripts/penguin-cffi-gen.py exposes it through the CFFI header. penguin.h and penguin-cffi-gen.py are byte-identical to the fork's. The emitter needed one port: the fork predates QEMU 11.1, where monitors became QOM objects, monitor_is_qmp() is gone and MonitorQMP no longer embeds a "common" Monitor. It now finds QMP monitors with
    object_dynamic_cast(..., TYPE_MONITOR_QMP), the idiom monitor/qmp.c uses. check-delta-present.sh now asserts the symbol in every system library.

The series applies 13/13 with strict context; patchedTree re-recorded; the import/export round trip is clean. nix build of penguin-qemu builds all 14 system libraries and check-delta-present passes.

…n uses

Port rehosting/qemu 862d4fb74f (#22), which penguin main now depends on:
plugins.qmp.emit_event() pushes an unsolicited QMP event of any name to
every connected monitor, the counterpart to the QMP command callback.
Without it, penguin cannot move from the fork to this repo without losing
that API.

Following the repo's split, only the edit to an upstream file is a patch:
  * 0013 adds monitor/penguin-event.c to the qmp source set;
  * src/monitor/penguin-event.c is the emitter, vendored;
  * src/include/system/penguin.h declares it and
    src/scripts/penguin-cffi-gen.py exposes it through the CFFI header.
penguin.h and penguin-cffi-gen.py are byte-identical to the fork's. The
emitter needed one port: the fork predates QEMU 11.1, where monitors became
QOM objects, monitor_is_qmp() is gone and MonitorQMP no longer embeds a
"common" Monitor. It now finds QMP monitors with
object_dynamic_cast(..., TYPE_MONITOR_QMP), the idiom monitor/qmp.c uses.
check-delta-present.sh now asserts the symbol in every system library.

The series applies 13/13 with strict context; patchedTree re-recorded;
the import/export round trip is clean. nix build of penguin-qemu builds
all 14 system libraries and check-delta-present passes.

Co-authored-by: Benjamin Levy <153011444+be32826@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant